home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Sample Controls / PowerPlant View / Directory Table ƒ / CFixedScroller.cp < prev    next >
Encoding:
Text File  |  1996-10-02  |  839 b   |  42 lines  |  [TEXT/CWIE]

  1. /*
  2.     CFixedScroller.cp
  3.     
  4.     This is a quick hack to fix a problem with PowerPlant in the
  5.     LGrafPortView.  Basically, we have to force the scrolled view
  6.     to draw or nothing happens.
  7.     
  8. */
  9.  
  10. #include "CFixedScroller.h"
  11. #include <LStdControl.h>
  12.  
  13. CFixedScroller*
  14. CFixedScroller::CreateFromStream(
  15.     LStream        *inStream)
  16. {
  17.     return (new CFixedScroller(inStream));
  18. }
  19.  
  20. CFixedScroller::CFixedScroller(
  21.     LStream        *inStream)
  22.         : LScroller(inStream)
  23. {
  24. }
  25.  
  26. void
  27. CFixedScroller::VertScroll(
  28.     const Int16    inPart)
  29. {
  30.     LScroller::VertScroll(inPart);
  31.     mScrollingView->Draw(nil);        // <--- this is the new call
  32.     mVerticalBar->FocusDraw();        // <--- Macintosh hates us if we don't do this
  33. }
  34.  
  35. void
  36. CFixedScroller::HorizScroll(
  37.     const Int16 inPart)
  38. {
  39.     LScroller::HorizScroll(inPart);
  40.     mScrollingView->Draw(nil);        // <--- ditto
  41.     mHorizontalBar->FocusDraw();    // <--- ditto
  42. }